import sys
sys.path.append('/modules/mutagen')

from modules import dl
from modules import gui
from mutagen.easyid3 import *
from modules import parse

import threading
import wx
import sys
import os



# https://pyda-python-downloader.googlecode.com/svn/trunk/

# Debug output for large stuff:
# f=open(r"./debug/file_n","w")
# f.write("tolog")
# f.close()

# class myThread (threading.Thread):
#     def __init__(self):#, threadID, name, counter
#         # self.threadID = threadID
#         # self.name = name
#         # self.counter = counter
#         threading.Thread.__init__(self)
#     def run(self):
#     	print("loading")
#     	dl.downloadYoutube("http://www.youtube.com/watch?feature=player_detailpage&v=b2hwWqVcD6c&list=WL62A9C48791BEF75F","./debug/test.flv","small")
#     	print("finished")

# thread1=myThread()
# thread1.start()

#dl.downloadYoutube(sys.argv[1],"./debug/test2.flv","hd1080")
# downloaders=[]

# for v in sys.argv[1:]:
# 	downloaders.append(YoutubeDownloader())]
# 	v,"./debug/"+v+".flv","small"


if __name__=="__main__":
	app = wx.App(False)
	frame = gui.MainWindow(None, 'Small editor')
	app.MainLoop()
parse.parseYoutubeUrl("http://www.youtube.com/watch?v=Kvhxo0iBJck")

#print(sys.argv)>>>>>>> .r22
